package com.zhifa.graph;

public class Test {
    public static void main(String[] args) {
        OrientedGraph<String> orientedGraph = new GraphWithAdjacencyMatrix<String>(10);
        orientedGraph.addNode("0");
        orientedGraph.addNode("1");
        orientedGraph.addNode("2");


        orientedGraph.addNode("5");
        orientedGraph.addNode("6");
        orientedGraph.addNode("7");



        orientedGraph.addNode("3");
        orientedGraph.addNode("4");
        //orientedGraph.addNode("4");


        orientedGraph.addEdge(new Edge<String>("0", "1"));
        orientedGraph.addEdge(new Edge<String>("1", "2"));
        orientedGraph.addEdge(new Edge<String>("1", "3"));
        orientedGraph.addEdge(new Edge<String>("2", "4"));
        orientedGraph.addEdge(new Edge<String>("3", "4"));
        //orientedGraph.addEdge(new Edge<String>("4", "4"));
        orientedGraph.addEdge(new Edge<String>("3", "7"));
        orientedGraph.addEdge(new Edge<String>("4", "6"));
        orientedGraph.addEdge(new Edge<String>("4", "5"));


        orientedGraph.show();
        orientedGraph.BFSGraph();



    }
}
